{extend name="public:common_index"/}
{block name="main"}
    <div class="panel panel-default">
        <div class="panel-heading">
            <h3 class="panel-title"><i class="fa fa-list"></i> {$title}</h3>
        </div>
        <div class="panel-body">
            <div class="navbar navbar-default">
                <form action="" id="search-form2" class="navbar-form form-inline" method="get" onsubmit="return false">
                    <div class="form-group">
                        <label class="control-label" for="input-order-id">MIYO ID</label>
                        <div class="input-group">
                            <input type="text" name="uuid" value="{$Think.get.uuid}" placeholder="MIYO ID"
                                   class="form-control">
                        </div>
                        <label class="control-label" for="input-order-id">用户昵称</label>
                        <div class="input-group">
                            <input type="text" name="nick_name" value="{$Think.get.nick_name}" placeholder="用户昵称"
                                   id="input-order-id" class="form-control">
                        </div>
                        <label class="control-label" for="input-order-id">充值方式</label>
                        <div class="input-group">
                            <select class="form-control" name="trade_type">
                                <option id="status" value="">全部</option>
                                <option id="status1" value="1">微信</option>
                                <option id="status2" value="2">支付宝</option>
                                <option id="status3" value="3">苹果内购</option>
                                <option id="status6" value="6">支付宝手动充值</option>
                                <option id="status7" value="7">微信公众号充值</option>
                                <option id="status8" value="8">后台手动充值</option>
                            </select>
                        </div>



                        <div class="form-group">
                            <label class="control-label" for="input-order-id">时间筛选</label>
                            <div class="input-group">
                                <input type="text" name="startDate"  autocomplete="off" value="{$Think.get.startDate}" placeholder="选择开始时间"
                                       class="form-control timepicker">
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="input-group">
                                <input type="text" name="endDate"  autocomplete="off" value="{$Think.get.endDate}" placeholder="选择结束时间"
                                       class="form-control timepicker">
                            </div>
                        </div>
                    </div>
                    <!--<div class="form-group">-->
                    <!--<label class="control-label" for="input-order-id">时间筛选</label>-->
                    <!--<div class="input-group">-->
                    <!--<input type="text" name="startDate"  autocomplete="off" value="{$Think.get.startDate}" placeholder="选择开始时间"-->
                    <!--class="form-control timepicker">-->
                    <!--</div>-->
                    <!--</div>-->
                    <!--<div class="form-group">-->
                    <!--<div class="input-group">-->
                    <!--<input type="text" name="endDate"  autocomplete="off" value="{$Think.get.endDate}" placeholder="选择结束时间"-->
                    <!--class="form-control timepicker">-->
                    <!--</div>-->
                    <!--</div>-->
                    <button type="submit" onclick="javascript:document.getElementById('search-form2').submit();"
                            id="button-filter search-order" class="btn btn-primary"><i class="fa fa-search"></i> 筛选
                    </button>
                    <br />
                    <lable>统计额:{$total} &nbsp;&nbsp;&nbsp;
                        <!--后台充值额:{$all}&nbsp;&nbsp;&nbsp; 用户充值额:{$total-$all}-->
                    </lable>

                </form>
            </div>
            <div id="ajax_return">
                <form method="post" enctype="multipart/form-data" target="_blank" id="form-order">
                    <div class="table-responsive">
                        <table class="table table-bordered table-hover">
                            <thead>
                            <tr>
                                <td>ID</td>
                                <td>用户ID</td>
                                <td>用户昵称</td>
                                <td>充值方式</td>
                                <td>付款金额</td>
                                <td>备注</td>
                                <td>充值时间</td>
                            </tr>
                            </thead>
                            <tbody>
                            <!-- 列表循环开始 -->
                            {volist name="rows" id="row" }
                            <tr>
                                <td>{$row.b_id}</td>
                                <td>{$row.uuid}</td>
                                <td>{$row.nick_name}</td>
                                <td>
                                    {switch name="$row.trade_type"}
                                    {case value="1"}微信{/case}
                                    {case value="2"}支付宝{/case}
                                    {case value="3"}苹果内购{/case}
                                    {case value="6"}支付宝手动充值{/case}
                                    {case value="7"}微信公众号充值{/case}
                                    {case value="8"}后台手动充值{/case}
                                    {default /}未知类型
                                    {/switch}
                                </td>
                                <td>{$row.money}</td>
                                <td>{$row.remark}</td>
                                <td>{$row.create_time}</td>
                            </tr>
                            {/volist}
                            <!-- 列表循环结束 -->
                            </tbody>
                        </table>
                    </div>
                </form>
            </div>
            <div id='pagerarea'>{$pageHTML}</div>
        </div>
    </div>
{/block}

{block name="js"}
<script>
    $(function () {
        var type   = "{$Think.get.type}";
        if(type != ''){
            $('#type'+type).attr('selected',true)
        }

        var status   = "{$Think.get.status}";
        if(status != ''){
            $('#status'+status).attr('selected',true)
        }




        var trade_type   = "{$Think.get.trade_type}";
        if(trade_type != ''){
            $('#trade_type'+trade_type).attr('selected',true)
        }


    })

</script>



{/block}



